Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up env for test & add basic unit test example #129

Merged
merged 13 commits into from
Feb 7, 2024
Merged

Conversation

0xSulpiride
Copy link
Member

@0xSulpiride 0xSulpiride commented Dec 6, 2023

Description

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Further comments (optional)

@0xSulpiride 0xSulpiride changed the title set up env for test & add basic unit test example wip: set up env for test & add basic unit test example Dec 6, 2023
@0xSulpiride 0xSulpiride changed the title wip: set up env for test & add basic unit test example feat: set up env for test & add basic unit test example Dec 21, 2023
@0xSulpiride
Copy link
Member Author

0xSulpiride commented Dec 21, 2023

Apparently viem library does not carry it's own evm for tests, it makes use of anvil or hardhat. We can use that with ethers.js as well, so I went on using Ethers in tests.
To run tests you must have Anvil installed: https://book.getfoundry.sh/getting-started/installation

Also added some tests for UserOpValidationService and EthModule

@0xSulpiride
Copy link
Member Author

I'll add some more unit tests for each module and service

Copy link
Member Author

@0xSulpiride 0xSulpiride left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on tests @Jineshdarjee! I have some minor comments

package-lock.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@0xSulpiride 0xSulpiride changed the base branch from master to develop January 10, 2024 12:40
@0xSulpiride 0xSulpiride merged commit 9198a0b into develop Feb 7, 2024
2 checks passed
@0xSulpiride 0xSulpiride deleted the test branch February 7, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants